<?php

namespace App\Http\Controllers\Admin\Business\Repository;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Http\Controllers\Admin\Business\Repository\ComboActivities
 *
 * @property int $id
 * @property int|null $sort
 * @property string|null $title 活动名称
 * @property string|null $thumb 封面
 * @property int|null $type 活动方式1折扣2减免价格
 * @property float|null $reduce 减免价格
 * @property float|null $rebate 折扣
 * @property int|null $rate_type 1按套餐2自定义
 * @property float|null $rate 返利
 * @property float|null $top_rate
 * @property string|null $desc 描述
 * @property string|null $content 详情
 * @property string|null $start_time 开始时间
 * @property string|null $end_time 结束时间
 * @property int|null $status 是否启用1是2否
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Http\Controllers\Admin\Business\Repository\Combo[] $combo
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereContent($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereDesc($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereEndTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereRate($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereRateType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereRebate($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereReduce($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereSort($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereStartTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereThumb($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereTitle($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereTopRate($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboActivities whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class ComboActivities extends Model
{
    //
    protected $table = 'combo_activities';
    public function combo(){
        return $this->belongsToMany('App\Http\Controllers\Admin\Business\Repository\Combo','combo_activities_relation','activity_id','combo_id');
    }

}
